package springmybatis.service.impl;

import springmybatis.dao.StudentDao;
import springmybatis.domain.Student;
import springmybatis.service.StudentService;

public class StuentServiceImpl implements StudentService {

    //定义Dao的引用类型的属性
    private StudentDao studentDao;

    //为了设置注入


    public void setStudentDao(StudentDao studentDao) {
        this.studentDao = studentDao;
    }

    @Override
    public int addStudent(Student student) {
        return studentDao.insertStudent(student);
    }
}
